
<template >
<div style="width: 80%;margin: auto ;height: 100vh">
  <el-scrollbar ref="scroll" class="scrollbar-wrapper" wrap-style="overflow-x:hidden;">
  <div>
    <el-row>
      <el-col>
        <h3 style="margin-top: 20px">播放历史</h3>
        <el-divider />
      </el-col>



    </el-row>
    <el-row style=""  v-for="(o) in videoData">
      <el-col  >
        <HistoryCard :videoh="o" :callback="callback"></HistoryCard>
      </el-col>
      <el-empty :description="暂无视频" v-show="videoData.length===0||videoData==undefined"></el-empty>
    </el-row>
  </div>
<div  style="margin: auto;width: 30%" >
  <el-pagination
      background
      layout="prev, pager, next"
      :total="100">
  </el-pagination>
</div>
<el-divider></el-divider>
  <el-divider></el-divider>
  </el-scrollbar>
</div>
</template>

<script>

import HistoryCard from "@/components/history/HistoryCard.vue";
import {hisadd,hislist} from "@/api";

export default {

  components: {HistoryCard},
  props: {
    hiscallback:{
      type: Function
    }
  },
  data() {
    return {
      videoData: [],
    }
  },
  mounted: function () {
    hislist({params:{uid:this.$cookies.get("user").id}}).then(
        res=>{
          this.videoData=res.data.data.list
        }
    )
  },

  methods: {
     callback(data){
      this.hiscallback(data)
     }
  }
}
</script>
<style scoped lang="less">

</style>